﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="ViewOrderList.aspx.cs" Inherits="ViewOrderList" Title="个人订单列表" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CPH_Main" runat="Server">
    <table style="width:100%">
        <tr>
            <td style="width: 715px">
                <asp:GridView ID="gdv_OrderList" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" AutoGenerateColumns="False" DataSourceID="ADS_OrderList" AllowPaging="True" OnRowDeleting="gdv_OrderList_RowDeleting">
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <RowStyle BackColor="#EFF3FB" />
                    <EditRowStyle BackColor="#2461BF" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:BoundField DataField="ord_nID" HeaderText="订单号" InsertVisible="False" SortExpression="ord_nID" />
                        <asp:BoundField DataField="ord_dtBookTime" HeaderText="下订单时间" SortExpression="ord_dtBookTime" />
                        <asp:BoundField DataField="ord_dtArrivalTime" HeaderText="就餐时间" SortExpression="ord_dtArrivalTime" />
                        <asp:BoundField DataField="ord_nTableNum" HeaderText="订餐桌数" SortExpression="ord_nTableNum" />
                        <asp:BoundField DataField="ord_sDesc" HeaderText="要求" SortExpression="ord_sDesc" />
                        <asp:CommandField ButtonType="Button" ShowDeleteButton="True" DeleteText="取消" HeaderText="取消订餐" />
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td style="width: 715px">
                <asp:AccessDataSource ID="ADS_OrderList" runat="server" DataFile="~/App_Data/DB_NCI5.mdb" SelectCommand="SELECT OrderRecord.ord_nID, OrderRecord.ord_dtBookTime, OrderRecord.ord_dtArrivalTime, OrderRecord.ord_nTableNum, OrderRecord.ord_sDesc, Restaurant.R_sName FROM (OrderRecord INNER JOIN Restaurant ON OrderRecord.ord_nState = Restaurant.R_nID) WHERE (OrderRecord.ord_nUserID = ?)" DeleteCommand="select * from OrderRecord">
                    <SelectParameters>
                        <asp:SessionParameter Name="?user" SessionField="UserID" />
                    </SelectParameters>
                </asp:AccessDataSource>
            </td>
        </tr>
    </table>
</asp:Content>
